package com.imooc.dataobject;

import javax.persistence.*;
import java.util.Date;

/**
 * @ClassName ProductCategory
 * @Description 类目
 *
 * product_catogry
 *      |- 不写`@Table(name = "product_catogry")`也是可以的
 *      |- spring会自动把这种下划线形式的表名转换为驼峰形式的类名
 *      |- 但如果你的表名不是这样的约束，那么就需要使用`@Table`来指定了。
 *
 * @Author Wxg
 * @Date 2018/11/13 13:59
 * @Version 1.0
 */
@Table(name = "product_catogry")
@Entity
public class ProductCategory {

    /** 类名id */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer categoryId;
    private String categoryName;
    private Integer categoryType;
//    private Date createTime;
//    private Date updateTime;


    public Integer getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Integer categoryId) {
        this.categoryId = categoryId;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public Integer getCategoryType() {
        return categoryType;
    }

    public void setCategoryType(Integer categoryType) {
        this.categoryType = categoryType;
    }


    @Override
    public String toString() {
        return "ProductCategory{" +
                "categoryId=" + categoryId +
                ", categoryName='" + categoryName + '\'' +
                ", categoryType=" + categoryType +
                '}';
    }
}
